﻿@using BoneSystem.Business.Entity.ItemComercial.ProdutoMercadoria.ClassesRelacionadas
@using BoneSystem.Extensions.Grid
@using BoneSystem.Models
@model IEnumerable<CorProduto>
@section scriptsHeader
{
    <script src="~/Scripts/angular-touch.js"></script>
    <script src="~/Functions/app.js"></script>
    <script src="~/Functions/functions.js"></script>
    <script src="~/Functions/Services/ServicesBase.js"></script>
    <script src="~/Functions/Controllers/controller_base.js"></script>
    <script src="~/Functions/Diretivas/autocomplete.js"></script>
    <script src="~/Scripts/angular-file-upload.js"></script>
}
@{
    Layout = "~/Views/Shared/_Layout.cshtml";
    var settings = new CadastroRestModel
    {
        ClassType = typeof (CorProduto),
        FormName = "formCor",
        DialogName = "dlgCor",
        DialogTitle = "Cadastro de cores",
        ControllerName = "CorProduto",
        Area = "Cadastros",
        DialogHeigth = 500,
        DialogWidth = 500,
        PartialForm = Html.Partial("CadastroPartial", new CorProduto())
    };
}

<script type="text/javascript">
    function corController($scope, boneSystemStorage) {
        $scope.urlList = '@settings.UrlList';
        $scope.urlNew = '@settings.UrlNewJson';
        $scope.urlDelete = '@settings.UrlDeleteJson';
        $scope.urlSave = '@settings.UrlSaveJson';
        $scope.urlGet = '@settings.UrlGet';
        boneSystemController($scope, boneSystemStorage);
    }

</script>

<form ng-app="boneSystemModule" ng-controller="corController" ng-view>

    @Html.Partial("Rest/_RestIndex", settings)
    
    @Html.BsGrid(model => model, new GridSettings()).GetHtmlString()
</form>
